<?php

class Zend_View_Helper_FormatDate extends Zend_View_Helper_Abstract
{

    function formatDate($timestamp, $format = 'short')
    {
        switch ($format)
        {
            case 'short':
                $formatStr = 'SHORT_DATE_FORMAT';
                break;
            case 'long':
            default;
                $formatStr = 'LONG_DATE_FORMAT';                
                break;
        }
        
        $date = new Zend_Date ( $timestamp, Zend_Date::TIMESTAMP, $this->view->lang );
        return $date->toString ( $this->view->translate ( $formatStr ) );
    }

}